package com.example.register.center.api;

import com.example.common.config.ServiceDefinition;
import com.example.common.config.ServiceInstance;

/**
 * @Author Peng Yisheng
 * @Date 2024/11/23 11:30
 * @Description 注册中心接口
 */
public interface RegisterCenter {
    void init(String registerAddress, String env);  // 初始化

    void register(ServiceDefinition serviceDefinition, ServiceInstance serviceInstance);  // 注册

    void deregister(ServiceDefinition serviceDefinition, ServiceInstance serviceInstance);  // 注销

    void subscribeAllServices(RegisterCenterListener registerCenterListener);  // 订阅所有服务变更
}
